package cn.itsource.org.query;

import lombok.Data;

@Data
public class DepartmentQuery {
    //分页条件
    //当前页
    private Integer currentPage = 1; //默认为第一页
    //每页显示多少条
    private Integer pageSize = 10; //默认每页十条


    //获取起始位置
    public Integer getStart(){
        return (currentPage-1)*pageSize;
    }
    public DepartmentQuery(Integer currentPage, Integer pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public DepartmentQuery() {
    }
}
